home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
lreplace.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
2KB
|
67 lines
lreplace(n) Tcl Built-In Commands
_________________________________________________________________
NAME
lreplace - Replace elements in a list with new elements
SYNOPSIS
lreplace _l_i_s_t _f_i_r_s_t _l_a_s_t ?_e_l_e_m_e_n_t _e_l_e_m_e_n_t ...?
_________________________________________________________________
DESCRIPTION
Lreplace returns a new list formed by replacing one or more
elements of _l_i_s_t with the _e_l_e_m_e_n_t arguments. _F_i_r_s_t gives
the index in _l_i_s_t of the first element to be replaced. If
_f_i_r_s_t is less than zero then it refers to the first element
of _l_i_s_t; the element indicated by _f_i_r_s_t must exist in the
list. _L_a_s_t gives the index in _l_i_s_t of the last element to
be replaced; it must be greater than or equal to _f_i_r_s_t.
_L_a_s_t may be end (or any abbreviation of it) to indicate that
all elements between _f_i_r_s_t and the end of the list should be
replaced. The _e_l_e_m_e_n_t arguments specify zero or more new
arguments to be added to the list in place of those that
were deleted. Each _e_l_e_m_e_n_t argument will become a separate
element of the list. If no _e_l_e_m_e_n_t arguments are specified,
then the elements between _f_i_r_s_t and _l_a_s_t are simply deleted.
KEYWORDS
element, list, replace
Tcl 1